import axios from 'axios'

const ajax = axios.create({
  baseURL: '/maoyan'
})

export const getVideoCategory = () => {
  return ajax.get('/asgard/asgardapi/sns/common/feed/channel/list.json?uuid=277767201E4711EBA93F2D4ABE13475B978FDA0ADDF7421C8836FE14CA5ADC52&channelId=4&feedChannelId=1331498&timestamp=1605002042343&offset=15')
}
export const getShowDeserveSee = () => ajax.get('https://show.maoyan.com/maoyansh/myshow/ajax/rankList?sellChannel=13&cityId=1&lng=0&lat=0')
export const getRecommendData = (start) => ajax.get(`https://show.maoyan.com/maoyansh/myshow/ajax/performances/0;st=4;p=${start};s=20;tft=0?sellChannel=13&cityId=1&lng=0&lat=0`)
export const getMustGrabData = () => ajax.get('https://show.maoyan.com/maoyansh/myshow/ajax/performances/rob/main?uuid=cfntvw2v1pm7t2cx1opmmac4ki10bao6wf5lyn3mrkmah9scdyj00dq7x6ji5lk6&clientType=1&os=1&sellChannel=13&cityId=1&lng=0&lat=0')
export const getBigStarData = () => ajax.get('https://show.maoyan.com/maoyansh/myshow/ajax/celebrityBasicList/query?uuid=cfntvw2v1pm7t2cx1opmmac4ki10bao6wf5lyn3mrkmah9scdyj00dq7x6ji5lk6&clientType=1&os=1&sellChannel=13&cityId=1&lng=0&lat=0')
export const getShowBanndersData = () => ajax.get('http://rap2api.taobao.org/app/mock/270296/banners')
export const getMovieList = () => ajax.get('/ajax/movieOnInfoList')
export const getMovieDetail = (id) => ajax.get(`/ajax/detailmovie?movieId=${id}&optimus_uuid=D2C590C0248711EBB4D7A10DB635F342499B0D2AC0934012AC87A500F33A938D&optimus_risk_level=71&optimus_code=10`)
export const getUser = (username, password) => {
  return ajax.post('http://rap2api.taobao.org/app/mock/270423/api/login', { username, password })
}
export const getSvideo = () => {
  return ajax.get('/asgard/asgardapi/sns/common/feed/channel/list.json?uuid=277767201E4711EBA93F2D4ABE13475B978FDA0ADDF7421C8836FE14CA5ADC52&channelId=4&feedChannelId=105&timestamp=1605065232330&offset=9')
}
export const getShowTicketData = (id) => ajax.get(`https://show.maoyan.com/maoyansh/myshow/ajax/v2/performance/${id}?sellChannel=13&cityId=1&lng=0&lat=0&token=FaqegvIlsMmY5mQTI50tmRVLoB0AAAAA6gsAABZ5eWQV3y14ziLmkuKg3n9l2xD_7pYMEA1oA7FMGAHcp02duWOnAk_u7exUyQoiUg`)
export const getsearch = (val) => ajax.get(`/ajax/search?kw=${val}&cityId=59&stype=-1`)
